<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/global/global-head.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>吉车惠后台管理系统</title>
	<%@include file="/global/global-other.jsp" %>
	<script type="text/javascript">
		$(function() {
			submitForm = function($dialog,$grid){
				$('#an_car_form').form('submit',{
					url:'${ctx}/an/service/update',
					queryParams:{_m:'exec'},
					onSubmit:function(){
						if($(this).form('enableValidation').form('validate')){
							return true;
						}else{
							return false;
						}
					},
					success:function(data){
						var json =  eval("(" +data+ ")");
						var deliveryAt = $("#deliveryAt").datebox('getValue');
						if(deliveryAt == ""){
							$.messager.alert("提示","请选择送达时间！","error");
							return;
						}
						var an_car_form = $('#an_car_form');
							if(statusMsg(json)){
								$.messager.alert("提示","保存成功！","info",function(){
									$dialog.dialog('destroy');
									$grid.datagrid('reload');
								});
							}
					}
				});
			};
		});
//		$(function(){
//			showTime();
//		})
//		function showTime(){
//			var today = new Date();
//			alert("The time is: " + today.toString ());
//
//			setTimeout("showTime()", 5000);
//		}

	</script>
	</head>
<body id="body">
<div class="form-box">
	<div class="form-body">
		<form role="form" name="an_car_form" id="an_car_form" class="easyui-form form form-horizontal" data-options="novalidate:true" method="post">
			<div class="seg-title">
				<div class="seg-title-box">
					<ul>
						<li class="seg-title-box-icon" ><img src="${ctx }/assets/images/communication.gif"/></li>
						<li class="seg-title-box-text">基本信息</li>
						<input type="hidden" id="postAddressId" name="postAddressId" value="${anServicePostAddressEntity.postAddressId}">
						<input type="hidden" id="deliveryBy" name="deliveryBy" value="${anServicePostAddressEntity.deliveryBy}">
					</ul>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">
					<p class="label-txt">受理人：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text" id="deliveryName" name="deliveryName" value="${anServicePostAddressEntity.deliveryName}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" disabled="disabled">
				</div>
				<label class="col-sm-2 control-label">
					<p class="label-txt">送达时间：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text" id="deliveryAt" name="deliveryAt" value="" class="form-control easyui-datebox" data-options="editable:false" style="width:100%;height:34px;line-height:34px;" validType="length[1,10]">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">
					<p class="label-txt">收件地址：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-8">
					<input type="text" id="address" name="address" value="${anServicePostAddressEntity.address}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" disabled="disabled">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">
					<p class="label-txt">联系电话：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text" id="phone" name="phone" value="${anServicePostAddressEntity.phone}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" disabled="disabled">
				</div>
				<label class="col-sm-2 control-label">
					<p class="label-txt">联系人：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text" id="recipients" name="recipients" value="${anServicePostAddressEntity.recipients}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" disabled="disabled">
				</div>
			</div>
		</form>
	</div>
</div>
</body>
</html>